{template 'common/header'}
<ol class="breadcrumb we7-breadcrumb">
	<a href="{php echo $this->createWebUrl('bannerlist');}"><i class="wi wi-back-circle"></i> </a>
	<li>
		<a href="{php echo $this->createWebUrl('bannerlist');}">banner管理</a>
	</li>
	<li>
		banner列表
	</li>
</ol>
<div class="clearfix">
	<form action="{php echo $this->createWebUrl('bannerlist')}" method="get">
		<input type="hidden" name="c" value="site">
		<input type="hidden" name="a" value="entry">
		<input type="hidden" name="do" value="bannerlist">
		<input type="hidden" name="m" value="{$_GPC['m']}">
		<input type="hidden" name="add_time" value="{$_GPC['add_time']}">
		<div class="form-group">
			<label class="col-sm-2 control-label">banner名称</label>
			<div class="input-group col-sm-4 pull-left">
				<input class="form-control" name="banner_title" type="text" value="{$_GPC['banner_title']}">
				<div class="input-group-btn">
					<button type='submit' class="btn btn-default"><i class="fa fa-search"></i> </button>
				</div>
			</div>
			<div class="pull-right">
				<a href="{php echo $this->createWebUrl('banneredit');}" class="btn btn-primary btn-sm">添加banner</a>
			</div>
		</div>
	</form>
	<table class="table table-bordered">
		<thead>
            <tr>
				<th>banner名称</th>
				<th>缩略图</th>
				<th>排序数字</th>
                <th>是否显示</th>
				<th>添加时间</th>
				<th>操作</th>
			</tr>
        </thead>
		 <tbody>
		{loop $banner_list $index $banner}
			<tr>
				<td>{$banner['banner_title']}</td>
				<td><img src="{php echo tomedia($banner['banner_thumb'])}" height='50'></td>
				<td>{$banner['banner_sort']}</td>
				<td>
					{if $banner['is_show'] == 1}
					<span class="label label-success">是</span>
					{else}
					<span class="label label-danger">否</span>
					{/if}
				</td>
				<td>{$banner['add_time']}</td>
				<td>
					<a href="{php echo $this->createWebUrl('banneredit', array('banner_id' => $banner['banner_id']));}" class="label label-success">编辑</a>
					<a href="{php echo $this->createWebUrl('bannerdel', array('banner_id' => $banner['banner_id']));}" class="label label-danger" onclick="if(!confirm('确定删除吗')) return false;">删除</a>
				</td>
			</tr>
		{/loop}
		</tbody>
	</table>
	<div class="text-right">
		{$pager}
	</div>
</div>

{template 'common/footer'}
